import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import { createPinia } from "pinia";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import "@/router/routerGuard.ts";
import "virtual:svg-icons-register";
import VueVideoPlayer from "@videojs-player/vue";
import "video.js/dist/video-js.css";

const app = createApp(App);
const PI_NIA = createPinia();
PI_NIA.use(piniaPluginPersistedstate);

app.use(router).use(PI_NIA).use(ElementPlus).use(VueVideoPlayer).mount("#app");
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
